import request from '@/utils/request'
import api from './index'
import qs from 'qs'
import { encryptAes } from '@/utils/encryptUtil'

// 保存每日申报
export const saveHealthInfo = (data) => {
  let encryptStr = encryptAes(JSON.stringify(data))
  return request({
    url: api.saveHealthInfo,
    method: 'post',
    data: qs.stringify({ 'paramText': encryptStr })
  })
}

// 获取每日申报
export const getDoctorHealthyList = (data) => {
  let encryptStr = encryptAes(JSON.stringify(data))
  return request({
    url: api.getDoctorHealthyList,
    method: 'post',
    data: qs.stringify({ 'paramText': encryptStr })
  })
}

// 保存14天行程史申报
export const saveDoctorSohournHistory = (data) => {
  let encryptStr = encryptAes(JSON.stringify(data))
  return request({
    url: api.saveDoctorSohournHistory,
    method: 'post',
    data: qs.stringify({ 'paramText': encryptStr })
  })
}

// 获取14天行程史申报
export const getDoctorSohournHistory = (data) => {
  let encryptStr = encryptAes(JSON.stringify(data))
  return request({
    url: api.getDoctorSohournHistory,
    method: 'post',
    data: qs.stringify({ 'paramText': encryptStr })
  })
}
